In order to make a zombie spanner, we're going to need some zombies.
So I'm going to use the roadblock Zombies in the toolbox.
Let's go to our toolbox.
And then with Marketplace selected models right here, we'll say drooling zombie.
There we go.
And here it is, Drooling Zombie by Roblox, marked as a high quality item.
That's what that little shield means.
Let's drag that zombie inside to the workspace.
There we go.
And we get a warning that there's scripts, but that's okay.
It's a roadblock product.
But you should be careful with scripts because people can put bad things in them.
Well, okay.
Go ahead and close the toolbox.
Let's turn our zombie around.
Here we go.
So unsuspecting of the bolder above, right collisions are off so I can duplicate in place control D
and hit the move button.
Drag him out a little bit.
There we go.
Control dx.
Maybe make another one over here.
Control dx to duplicate.
Coup and control day or do one more.
Let's do like five zombies.
Cool.
Now, with those zombies over here in the Explorer, let's select the top one with our mouse shift.
Click the bottom one.
It selects all of them.
I'm going to right click and then group as model or you can do group is folder.
It'll work the same way, but I'm going to do group is model.
Group is model.
Cool.
All right.
I'm going to call this I'll just call it zombies, right?
We've got to be careful.
We don't have too many things with the same name, but I think I'm all right there.
All right.
Now, I don't want them in the workspace.
I'm going to put them in server storage, which is a service that stores things on the server.
I'll hit a plus sign for server storage, add a folder for all of my simple spawning stuff with this
zombie spanner.
I think I'll call this simple Z spanner.
Where's my Z z spanner?
Cool.
Let's get our zombies and drag it down here.
We might have a lot of stuff in server storage, so I'm going to start making folders just to keep things
organized.
Now, we can't we can't run scripts in server storage, but we do have another service that runs scripts
on startup called Server Script Service.
Let's hit this plus sign.
Add a server script, Obviously because it's called server script service.
You can put more than a server script in there though.
Let's call this Z spanner Z spanner.
Cool.
Now we need to spawn those zombies, so we need to get a reference to server storage.
Let's do that.
Local will make a variable called SAS short for server storage equals game.
Get service server storage.
All right.
So this server storage right here is the service.
It's a singleton.
There can only be one, right?
There's only one server storage.
And here's our reference to it.
All right, Now in server storage, we have a folder who is simple Z spanner.
I'll call that S Z s.
This is a short script, so we don't have to be too descriptive of these things.
I'm going to say, assess, wait for child simple Z spanner.
All right, now I need my zombies in SW zs, so I will call this I'll make this more descriptive because
I'm going to use it inside the script Zombie model.
Right.
I'll get my Z's weight for child zombies, right?
That zombie model, I made the variable zombie model so I didn't forget.
All right, now we're going to do a loop.
We can do a while loop, right?
We're going to keep spawning until we turn it off.
Right now, we're not going to be able to turn it off.
We're going to keep this simple for the first video.
I am going to wait a short period of time.
That's going to be like an intermission.
Then I'm going to get my zombies.
This is going to be a clone of the zombie model, right?
We're going to make it an exact clone.
Same place in the world where we created it.
Same number of zombies positioned the same direction, facing the same direction.
So we'll get our zombies and then we'll assign the parent to that zombie model.
The workspace will assign the workspace to As the parent of the zombie model, we have to put it in
the workspace in that way or some descendant of the workspace in order to see the zombies.
Cool.
We'll wait again.
This is going to be the fight time, right?
Maybe make it 25 seconds and then when it's all over and get those zombies, we're going to destroy
them.
Boom!
Dead.
All right.
These are called literals.
When you put the actual number or value of something inside your code, they call it literals, it's
typically frowned upon.
So I'm going to make variables for them.
I'm going to make an intermission variable called five, and then I'm going to make another one called
round.
Right?
That's going to be 25.
So this intermission copy, we'll go right here.
Boom, this round.
It's got to go right there.
Cool.
Let's try it out.
Let's see if we got some zombies.
And it should appear.
Oh, we do have zombies.
All right.
We got all but one.
That's pretty cool.
Now we're going to get more zombies, but this one will disappear, and then we'll get more zombies.
We're going to change that, too.
We're going to do a little more flexibility with things like that.
Let's see if we get another round, though.
I don't want to quit until we know that it's working.
That comes.
I just checked.
Oh, and I have the badge.
We got more zombies, so we know we're up and running.
We're.
We're good to go.
Let's go ahead and prove this zombie thing in our next video.